#include "resmanagertest.h"


/*
TEST_FIXTURE(ResManagerFixture,DummyTest) {
	cout << "\nStarting ResManager Tests\nDummy ResManager Test\n";
    
    char curdir[4096];
    cout << getcwd(curdir,4096) << endl << curdir << endl;
    myMan.LoadBundle(string(curdir) + "/" + string("null.7z"));
}
TEST_FIXTURE(ResManagerFixture,ParseTest) {
	cout << "Parse ResManager Test\n";
    
    char curdir[4096];
    cout << getcwd(curdir,4096) << endl << curdir << endl;
    myResManager.LoadBundle(string(curdir) + "/" + string("test1.7z"));
    
    cout << "__________________________________________________\n";
    
    myParser.read((myResManager.getRoot() + 
    #if defined(WIN32) || defined(_WIN32)
    string("\\index.xml")).c_str());
    #else
    string("/index.xml")).c_str());
    #endif

}

TEST_FIXTURE(ResManagerFixture,ImgTest) {
	cout << "Img ResManager Test\n";
    
    char curdir[4096];
    cout << getcwd(curdir,4096) << endl << curdir << endl;
    myResManager.LoadBundle(string(curdir) + "/" + string("testimg.7z"));
    
    cout << "__________________________________________________\n";
    
    myParser.read((myResManager.getRoot() + 
    #if defined(WIN32) || defined(_WIN32)
    string("\\index.xml")).c_str());
    #else
    string("/index.xml")).c_str());
    #endif

	for(int i =0;i<100;i++) { myRenderer.render(i); SDL_Delay(10); cout <<  i << "..";}
	cout << "done\n";
}
*/
TEST_FIXTURE(ResManagerFixture,EventTest) {
	cout << "**** Event ResManager Test\n";
	  char curdir[4096];
    cout << getcwd(curdir,4096) << endl << curdir << endl;
    myResManager.LoadBundle(string(curdir) + "/" + string("testevent.7z"));
    
    cout << "__________________________________________________\n";
    
    myParser.read((myResManager.getRoot() + 
    #if defined(WIN32) || defined(_WIN32)
    string("\\index.xml")).c_str());
    #else
    string("/index.xml")).c_str());
    #endif

	for(int i =0;i<100;i++) { myRenderer.render(i); SDL_Delay(10); cout <<  i << "..";}
	cout << "done\n";
}
